#include<iostream>
#include<cmath>
using namespace std;


void reset(int *a, int *b){
	double t;
	t = (*a+*b)/2.0;
	*a = round(t);
	*b = round(t);
	
}



int main()
{
	int a,b;
	cin>>a>>b;
	
	reset(&a,&b);
	cout<<a<<" "<<b;
	
	return 0;
}
